﻿<UserControl x:Class="Bewise.Phone.Flag"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="280" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot" Height="Auto" MouseLeftButtonUp="LayoutRoot_MouseLeftButtonUp" Margin="20, 20, 20, 0">
        <Grid.Resources>
            <Storyboard x:Name="hide">
                <DoubleAnimation To="0" Duration="0:0:0.2" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity"/>
            </Storyboard>
        </Grid.Resources>
        <Border Margin="5, 20, 5, 20" BorderThickness="2" BorderBrush="{StaticResource PhoneBorderBrush}" Background="{StaticResource PhoneChromeBrush}">
            <TextBlock x:Name="messageText" Text="Test" Margin="8" TextAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap"/>
        </Border>
        <Grid x:Name="offsetUpGrid" Visibility="Collapsed">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="offsetUpTransform" />
            </Grid.RenderTransform>
            <Path Data="M0,1 L0.5,0 1,1" HorizontalAlignment="Center" Height="20" Stretch="Fill" Stroke="{StaticResource PhoneBorderBrush}" StrokeThickness="2" VerticalAlignment="Top" Width="40" Fill="{StaticResource PhoneChromeBrush}">
                <Path.RenderTransform>
                    <TranslateTransform Y="4"/>
                </Path.RenderTransform>
            </Path>
            <Rectangle StrokeThickness="0" Fill="{StaticResource PhoneChromeBrush}" Height="5" VerticalAlignment="Top" Width="40" Margin="0,22,0,0"/>
        </Grid>
        <Grid x:Name="offsetDownGrid" >
            <Grid.RenderTransform>
                <TranslateTransform x:Name="offsetDownTransform" />
            </Grid.RenderTransform>
            <Path Data="M0,0 L0.5,1 1,0" HorizontalAlignment="Center" Height="20" Stretch="Fill" Stroke="{StaticResource PhoneBorderBrush}" StrokeThickness="2" VerticalAlignment="Bottom" Width="40" Fill="{StaticResource PhoneChromeBrush}">
                <Path.RenderTransform>
                    <TranslateTransform Y="-4"/>
                </Path.RenderTransform>
            </Path>
            <Rectangle StrokeThickness="0" Fill="{StaticResource PhoneChromeBrush}" Height="5" VerticalAlignment="Bottom" Width="40" Margin="0,0,0,22"/>
        </Grid>
    </Grid>
</UserControl>
